﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="Lesson03._Default" %>

<%--Output cach in 10 seconds--%>
<%--<%@ OutputCache Duration="10" VaryByParam="None" %>--%>

<%@ OutputCache Duration="20" VaryByParam="ctl00$MainContent$ddlChoiceDropDownList" %>

<%--Output cache in 15 seconds with parameter search; category--%>
<%--<%@ OutputCache Duration="15" VaryByParam="search;category" %>--%>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Welcome to ASP.NET!
    </h2>
    APPLICATION CACHE
    <hr />
    <p>
        <asp:Label ID="Label1" runat="server" Text="Label" Font-Bold="True" Font-Size="Larger"
            ForeColor="Red"></asp:Label><br />
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Create Cache File" />
        <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Show Cache File" />
        <asp:Label ID="Label2" runat="server" Text="(Please change file content to clear cache!)"></asp:Label>
        <br />
        <asp:Button ID="Button3" runat="server" Text="Create 1 min. Cache" OnClick="Button3_Click" />
        <asp:Button ID="Button4" runat="server" Text="Show Cache File" OnClick="Button4_Click" />
        <asp:Label ID="Label3" runat="server" Text="(Please wait 1 minute to clear cache!)"></asp:Label>
        <br />
        <asp:Button ID="Button5" runat="server" OnClick="Button5_Click" Text="Create 1min. timespan cache" />
        <asp:Button ID="Button6" runat="server" OnClick="Button6_Click" Text="Show Cache Content" />
        <asp:Label ID="Label4" runat="server" Text="(Please don't click any button until 1 minute after created cache)"></asp:Label>
        <br />
        <asp:TextBox ID="txtResult" runat="server" Height="131px" Width="294px"></asp:TextBox>
        <br />
        To learn more about ASP.NET visit <a href="http://www.asp.net" title="ASP.NET Website">
            www.asp.net</a>.
    </p>
    PAGE CACHE
    <hr />
    <asp:Label ID="lblChosenLabel" runat="server" Text="Label"></asp:Label><br />
    <asp:DropDownList ID="ddlChoiceDropDownList" runat="server">
        <asp:ListItem>One</asp:ListItem>
        <asp:ListItem>Two</asp:ListItem>
        <asp:ListItem>Three</asp:ListItem>
    </asp:DropDownList>
    <br />
    <asp:Button ID="btnSubmitButton" runat="server" Text="Ok" 
        onclick="btnSubmitButton_Click" />
    <p>
        You can also find <a href="http://go.microsoft.com/fwlink/?LinkID=152368&amp;clcid=0x409"
            title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>.
    </p>
</asp:Content>
